<!DOCTYPE HTML>
<HTML>
    <head>
        <TITLE>jquery 框选表格数据复制到剪贴板</TITLE>
        <meta charset=utf-8>
        <script src="jquery-3.2.1.min.js" type="text/javascript"></script>
        <script src="jquery-mytablecopy-1.0.0.js" type="text/javascript"></script>
        <style type="text/css">
		table{border-collapse:collapse;border:1px solid;}
        td{height: 50px;width: 80px;border:1px solid;padding-left:10px;background-color:#eee;}
        input{height: 20px;width: 80px;border:0px solid;background-color:#eee;}
        </style>
    </head>
    
    <body>
		复制表格TD文字内容 #datasheet1<br/>
        <table id="datasheet1">
            <tr>
                <td>aa</td>
                <td>ab</td>
                <td>C1</td>
                <td>D1</td>
                <td>C1</td>
                <td>FSD</td>
                <td>SDF</td>
                <td>DSF</td>
                <td>TAB</td>
                <td>CCCC</td>
            </tr>
            <tr>
                <td>DDD</td>
                <td>1</td>
                <td>SDF</td>
                <td>23</td>
                <td>SDF</td>
                <td>DS</td>
                <td>DSF</td>
                <td></td>
                <td>DD</td>
                <td>DD</td>
            </tr>
            <tr>
                <td>DSF</td>
                <td></td>
                <td>DS</td>
                <td></td>
                <td>DF</td>
                <td>D</td>
                <td>FDS</td>
                <td></td>
                <td>SD</td>
                <td>11</td>
            </tr>
        </table>
    <script type="text/javascript">
     </script>
		复制表格TD中input值 datasheet2<br/>
		  注意:IE点击INPUT后开始拖动选择无效，需点击input之外选择<br/>
        <table id="datasheet2">
            <tr>
                <td><input value="1-1"></td>
                <td><input value="1-2"></td>
                <td><input value="1-3"></td>
                <td><input value="1-4"></td>
                <td><input value="1-5"></td>
                <td><input value="1-6"></td>
                <td><input value="1-7"></td>
                <td><input value="1-8"></td>
                <td><input value="1-9"></td>
                <td><input value="1-10"></td>
            </tr>
            <tr>
                <td><input value="2-1"></td>
                <td><input value="2-2"></td>
                <td><input value="2-3"></td>
                <td><input value="2-4"></td>
                <td><input value="2-5"></td>
                <td><input value="2-6"></td>
                <td><input value="2-7"></td>
                <td><input value="2-8"></td>
                <td><input value="2-9"></td>
                <td><input value="2-10"></td>
            </tr>
            <tr>
                <td><input value="3-1"></td>
                <td><input value="3-2"></td>
                <td><input value="3-3"></td>
                <td><input value="3-4"></td>
                <td><input value="3-5"></td>
                <td><input value="3-6"></td>
                <td><input value="3-7"></td>
                <td><input value="3-8"></td>
                <td><input value="3-9"></td>
                <td><input value="3-10"></td>
            </tr>
        </table>
		<p id="debug">调试信息</p>
    <script type="text/javascript">
		$(function(){createtablecopy($("#datasheet1"));});
		$(function(){createtablecopy($("#datasheet2"),"input");});	//不兼容IE,mouseover IE穿透原因
     </script>
    </body>
</HTML>